package com.sunnyweather.android.logic.network;

import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;

public class ServiceCreator {
    private static final String BASE_URL = "http://api.caiyunapp.com/";
    private Retrofit retrofit = new Retrofit.Builder().baseUrl(BASE_URL)
            .addConverterFactory(GsonConverterFactory.create())
            .build();

    public static final ServiceCreator INSTANCE = new ServiceCreator();

    private ServiceCreator() {

    }

    public Object create() {
        return create(Object.class);
    }

    public final Object create(Class var) {
        return retrofit.create(var);
    }


}
